<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body ng-app="app">
<form ng-controller="myControl" ng-submit="save()" name="myform">
    <input type="text" required ng-model="user.name">
    <input type="text" required ng-model="user.password">
    <input type="submit" ng-disabled="myform.$invalid">
</form >
<script>
    var app = angular.module('app',[]);

    app.controller('myControl',['$scope',function($scope){
        $scope.user = {
            name:"baiqingchun",
            password:"123456"
        }
        $scope.save =function(){
            alert(1111);
        }
    }]);

</script>
</body>
</html>